<h1>Your Pragmatic Catalog</h1>

<% @products.each do |product| -%>
  <div class="entry">
    <%= image_tag(product.image_url) %>
    <h3><%=h product.title %></h3>
    <%= product.description %>
    <div class="price-line">
    <span class="price"><%= number_to_currency(product.price) %></span>
    <%  form_remote_tag :url => {:action => "add_to_cart", :id => product} do %>
      <%= submit_tag "添加到购物车" %>
    <%end %>
    </div>
  </div>
<% end %>